/******************************************************************************/
package jamie.org.sil.www.usxUtils;


/******************************************************************************/
/**
 * A base class for elements of a parsed text string.
 *
 * @author ARA "Jamie" Jamieson
**/

public class ParsedTextElementNumber extends ParsedTextElement
{
  public ParsedTextElementNumber (String val) { m_Val = val; }
  public String getNumber () { return m_Val; }
  @Override public String getSubverse () { return m_Subverse; }
  public void setNumber (String val) { m_Val = val; }
  @Override public void setSubverse (String val) { m_Subverse = val; }
  
  @Override public String toString (BibleReferenceSupport.Length fullOrAbbreviated,
                                    BibleReferenceSupport.Language englishOrVernacular,
                                    int sepType,
                                    boolean includeDefaultedValues)
  {
    String s = (englishOrVernacular == BibleReferenceSupport.Language.C_Vernacular) ?
            m_Val : Integer.toString(NumeralProcessor.instance().fromVernacular(m_Val));
    return s + m_Subverse;
  }
  
  private String m_Subverse = "";
}
